﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CopyValue.cs" company="">
//   
// </copyright>
// <summary>
//   The copy value.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.Core
{
    using System;

    /// <summary>
    /// The copy value.
    /// </summary>
    /// <typeparam name="T">
    /// </typeparam>
    public class CopyValue<T> : ICopyValue
    {
        #region Fields

        /// <summary>
        ///   The _value.
        /// </summary>
        private readonly T value;

        #endregion

        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="CopyValue{T}"/> class.
        /// </summary>
        /// <param name="value">
        /// The value. 
        /// </param>
        public CopyValue(T value)
        {
            this.value = value;
        }

        #endregion

        #region Public Properties

        /// <summary>
        ///   Gets the value type.
        /// </summary>
        public Type ValueType
        {
            get
            {
                return typeof(T);
            }
        }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        ///   The get value.
        /// </summary>
        /// <returns> The <see cref="object" /> . </returns>
        public object GetValue()
        {
            return this.value;
        }

        #endregion
    }
}